<div class="wp-20" ui-view="container">
    <div ng-if="!noPermission">
        <div class="head_title" >
            <span class="tit-color">主播标签</span>
        </div>
        <div class="searchWapper white-background" style="margin-top: 15px">
            <div class="form-group searchLump">
                <div class="searchTitle" style="margin-top: -4px">操作：</div>
                <div class="search-select">
                    <button class="btn btn-primary" style="margin-left: 20px" ng-click="addCommonDimensions()">新建</button>
                    <button class="btn btn-primary" style="margin-left: 6px" ng-click="selectChangeStatus(4)">启用</button>
                    <button class="btn btn-primary" style="margin-left: 6px" ng-click="selectChangeStatus(2)">禁用</button>
                    <button class="btn btn-primary" style="margin-left: 6px" ng-click="selectDelete()">删除</button>
                </div>

            </div>
        </div>

        <div class="white-background" style="margin:15px  0px">

            <table class="table table-bordered table-hover table-page">

                <thead>
                <tr>
                    <th><input type="checkbox" id="allCheck" class="magic-checkbox" ng-model="$parent.allChecked"
                               ng-change="allCheckChange(allChecked)">
                        <label for="allCheck"></label></th>
                    <th>维度_ID</th>
                    <th>维度名称</th>
                    <th>标签数</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="commonDimens in commonDimensionList">

                    <td>
                        <input type="checkbox" id="{{$index}}" class="magic-checkbox" ng-model="commonDimens.checked" ng-change="itemCheckedChange()"
                        >
                        <label for="{{$index}}"></label>
                    </td>
                    <td>
                        {{commonDimens.dimensionId}}
                    </td>
                    <td>
                        {{commonDimens.dimensionsName}}
                    </td>

                    <td>
                        {{commonDimens.anchordTagNum}}
                    </td>
                    <td>
                        {{table[commonDimens.status]}}
                    </td>

                    <td>
                        <a ng-click="addCommonDimensions(commonDimens)" class="time-out">编辑</a>
                        <a ui-sref="main.anchorTags.manage({dimensionId:commonDimens.dimensionId,pageNo:1})" class="time-out">标签管理</a>
                        <a ng-show="commonDimens.status==4" ng-click="changeStatus(commonDimens)" class="time-out">禁用</a>
                        <a ng-show="commonDimens.status==2" ng-click="changeStatus(commonDimens)" class="time-out">启用</a>
                        <a ng-click="deleteCommonDimens(commonDimens.dimensionId)" class="time-out">删除</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>

        <div class="panel-footer paging">
            <s-pagination conf="paginationConf"></s-pagination>
        </div>
    </div>
    <div ng-if="noPermission" ng-include="'templates/no-permission.html'"></div>



    <script type="text/ng-template" id="anchorDimensModal.html">

        <div class="modal-header ng-scope">
            <button type="button" class="close" ng-click="modelCancel()"><span>&times;</span></button>
            <span class="modal-title ng-binding">通用标签维度管理</span>
        </div>
        <form class="w5c-form demo-form"  w5c-form-validate name="commonDimens">
            <div class="modal-body ng-scope">

                <div class="control-group text-align-left channel-manage form-group" style="margin-bottom: 0px">
                    <label class="control-label form-require w-109"><i class="red-icon">*</i>维度名称：</label>
                    <div class="controls modal-input" style="margin-bottom: 6px;display: inline-table">
                        <input type="text" placeholder="维度名称" ng-model="formData.dimensionsName" name="dimensionsName"
                               required="" pattern="^[\u4e00-\u9fa5]{2,20}$">
                    </div>
                <span ng-if="nameCheck" class="cl cr w5c-error" style="margin-left: 112px;display: inline-block;margin-top: -10px">
                    <i class="fa fa-times error" aria-hidden="true"></i>{{message}}
                </span>
                </div>

                <div class="control-group text-align-left">
                    <label class="control-label form-require w-109">维度状态：</label>
                    <div class="controls modal-input" style="text-align: left">
                        <label class="radio-inline iw-110">
                            <input type="radio" name="status" value="4" class="magic-radio" id="start" ng-model="formData.status">
                            <label for="start" style="top: -1px;margin: 0px 10px 0px -18px;"></label>
                            启用
                        </label>
                        <label class="radio-inline iw-110">
                            <input type="radio" name="status" value="2" class="magic-radio" id="stop" ng-model="formData.status">
                            <label for="stop" style="top: -1px;margin: 0px 10px 0px -18px;"></label>
                            禁用
                        </label>
                    </div>
                </div>
            </div>


            <div class="modal-footer">
                <button class="btn btn-primary" type="button" w5c-form-submit="modelOk()">确定</button>
                <button class="btn ims-btn" type="button" ng-click="modelCancel()">取消</button>
            </div>
        </form>
    </script>


    <!--<a ui-sref="campaigns.detail({campaignsId:1})"  ui-sref-opts="{inherit:false}">aaaaa</a>-->
</div>
